import rtconfig
from building import *

cwd = GetCurrentDir()

src = ['src/stm32l4xx_hal.c',
       'src/stm32l4xx_hal_cortex.c',
       'src/stm32l4xx_hal_pwr.c',
       'src/stm32l4xx_hal_pwr_ex.c',
       'src/stm32l4xx_hal_rcc.c',
       'src/stm32l4xx_hal_rcc_ex.c',
       'src/stm32l4xx_hal_dma.c',
       'src/stm32l4xx_hal_tim.c',
       'src/stm32l4xx_hal_tim_ex.c',
       'src/stm32l4xx_hal_flash.c',
       'src/stm32l4xx_hal_gpio.c',
       'src/stm32l4xx_hal_flash_ex.c']

path = [cwd + '/inc']

CPPDEFINES = ['USE_HAL_DRIVER']

src += ['src/stm32l4xx_hal_uart.c']
src += ['src/stm32l4xx_hal_uart_ex.c']

group = DefineGroup('STM32L4xx_HAL_Driver', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

Return('group')
